/// 布局页 * 重定向

import { genComponent } from '@expresso/plus'
import { useRoute, useRouter } from 'vue-router'

/**
 * 重定向
 */
export default genComponent({ name: 'Redirect' }, () => {
  const route = useRoute()
  const router = useRouter()
  const { params, query } = route
  const { path } = params

  router.replace({ path: `/${path}`, query })

  return () => <div />
})
